﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Marmat.Forms
{
    public class SearchControlFilterCollection 
    {
        private SearchControl searchControl;

        public SearchControlFilterCollection(SearchControl searchControl)
        {
            this.searchControl = searchControl;
        }

        public void Add(ISearchControlItemBase item)
        {
            this.searchControl.AddFilter(item);
        }

        public void Add<TEntity>()
        {
            this.searchControl.AddFilter<TEntity>();
        }

        public void Add<TEntity>(params string[] columns)
        {
            this.searchControl.AddFilter<TEntity>(columns);
        }

        public void Add<TEntity>(Expression<Func<TEntity, object>> expression)
        {
            this.searchControl.AddFilter<TEntity>(expression);
        }

        public void Clear()
        {
            this.searchControl.EditValue = null;
        }

        public void Remove(string name)
        {
            throw new NotImplementedException();
        }
    }
}
